<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller
{
    public function index()
    {
        $this->ad();
        $this->newsList();
        $jssdk = new JSSDK("wx9669fea75cb8379a", "1ac0044be56fc402561ec6ab7e4401fa");
        $signPackage = $jssdk->GetSignPackage();
        $this->assign('signPackage',$signPackage);
        $this->display();
    }

    public function ad()
    {
        $NavAdModel=M('NavAd');
        $st_ad=new StrategyController($NavAdModel);
        $this->assign('ad',$st_ad->result);

    }

    public function newsList()
    {
        $newsModel=M('News');
        $st_news=new StrategyController($newsModel);
        $this->assign('news',$st_news->result);

    }
}